import React,{Component} from 'react';
import {HashRouter,BrowserRouter,Route,Switch,Redirect,withRouter} from 'react-router-dom'


import LoadableComponent from '@/utils/loadable'

import {connect} from 'react-redux'

import './App.less';
import './assets/iconfont/iconfont.css';
import "antd/lib/style/themes/default.less"


const Login=LoadableComponent(import('@/pages/login/index.js'));
const Index=LoadableComponent(import('@/pages/index/index.js'));



class App extends Component {
  constructor(props){
    super(props);
  }
  componentWillMount(){
   
  }
  render(){
    // const {value,msg}=this.state; //解构
    return (
      <HashRouter  >
         <Switch> 
            <Route path='/login'   component={Login}></Route>
            <Route exact path='/'  component={Index}></Route>
            <Redirect to="/" />
         </Switch> 
      </HashRouter>
    );
  }
}


export default connect(state=>state)(App);
